package com.wpml.netty.rpc;

import java.util.concurrent.ConcurrentHashMap;

public class Dispatcher {

    private static Dispatcher dis;

    static {
        dis = new Dispatcher();
    }

    private Dispatcher() {}

    public static Dispatcher getInstance() {
        return dis;
    }

    public static ConcurrentHashMap<String, Object> invokeMap = new ConcurrentHashMap<>();

    public void register(String key, Object val) {
        invokeMap.put(key, val);
    }

    public Object get(String key) {
        return invokeMap.get(key);
    }
}
